<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">

<head>

    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>


    <title>jqGird</title>
    <!-- 引入公用部分 -->
    <script th:replace="common/head::static"></script>



    <link th:href="@{css/jquery-ui.css}" rel="stylesheet"/>

    <style>
        /* Additional style to fix warning dialog position */
        #alertmod_table_list_2 {
            top: 900px !important;
        }

        input {
            margin-top: 10px;
        }

        .layui-form-label {
            margin-top: 10px;
        }
    </style>

</head>

<body class="gray-bg">

<form class="layui-form"  id="f1" v-on:submit.prevent="addSendScan()">

    <div class="layui-inline">
        <label class="layui-form-label" style="width: 90px">
            <span style="color: red;">
						运单编号
					</span></label>
        <div class="layui-inline">
            <input type="text" id="waybillId" name="waybillId"  v-model="waybillId"  readonly="readonly"
                   autocomplete="off" lay-verify="required" class="layui-input width-d">
        </div>
    </div>
    <div class="layui-inline">
        <label class="layui-form-label" style="width: 90px">操作日期</label>
        <div class="layui-inline">
            <input type="datetime-local" name="operationTime" id="operationTime"    placeholder="选择日期"
                   class="layui-input width-a" lay-key="1">
        </div>
    </div>


    <div class="layui-inline">
        <label class="layui-form-label" style="width: 90px">操作网点</label>
        <div class="layui-inline">
            <input type="text" id="operateBranch" name="operateBranch" v-model="operateBranch" readonly class="layui-input width-a">
        </div>
    </div>


    <div class="layui-inline">
        <label class="layui-form-label" style="width: 90px">
            操作人员
        </label>
        <div class="layui-inline">
            <input type="text" id="operator" name="operator"  v-model="operator" readonly class="layui-input width-a">
        </div>
    </div>

    <div class="layui-inline">
        <label class="layui-form-label" style="width: 90px">
            下一站
        </label>
        <div class="layui-inline" style="    width: 190px;margin: 13px 0 0 0;">
            <v-select placeholder="请选择下一站"
                      :options="nextBranchList"
                      v-model="nextBranch"
                      :reduce="option => option.value">
            </v-select>
        </div>
    </div>

    <div class="layui-inline">
        <label class="layui-form-label" style="width: 90px">
            目的地
        </label>
        <div class="layui-inline">
            <input type="text" id="destination" name="destination" v-model="destination"  readonly class="layui-input width-a">
        </div>
    </div>


    <br>
    <div class="layui-inline" style=" margin: 10px 90px 15px 29px;">
        <button type="submit" class="layui-btn layui-btn-normal" ><i class="layui-icon"></i> 添加
        </button>
        <button type="reset" style="background-color:#ff7d5a" class="layui-btn"><i class="layui-icon"></i>重置
        </button>
    </div>
</form>

<!-- 主体 -->
<div class="wrapper wrapper-content  animated fadeInRight" style="padding-top: 0;">
    <div class="row">
        <div class="col-sm-12">
            <div class="jqGrid_wrapper">
                <table id="table_list_2"></table>
                <div id="pager_list_2"></div>
            </div>
        </div>
    </div>
</div>


</body>
<style type="text/css">
    .sel {
        margin: 0 0 0 24px;
        width: 158px;
        height: 24px;
    }

    #table_list_2 > tbody > tr > td, .ui-jqgrid-labels > th {
        padding: 8px 2px 8px 8px;
        border: 1px solid #e7eaec;
    }

    .jqgfirstrow {
        display: none;
    }

    * {
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    .ui-jqgrid .ui-jqgrid-bdiv {
        border-top: 1px solid #E1E1E1;
        overflow-x: auto;
    }

    .frozen-div .frozen-bdiv {
        background-color: #E4E6E9; /*与网页背景色一致*/
    }
</style>
<script>
    layui.use(['form'], function () {
        var form = layui.form
            , layer = layui.layer;
    });
    $(function(){
        var today = new Date();//返回当前日期和时间
        var yyyy = today.getFullYear();//获取当前年份
        var MM = today.getMonth() + 1;//因为getMonth()方法获取的是索引值，获取的月份为0-11，所以要＋1
        var dd = today.getDate();//从 Date 对象返回一个月中的某一天 (1 ~ 31）
        var hh = today.getHours();//返回 Date 对象的小时 (0 ~ 23)
        var mm = today.getMinutes();//返回 Date 对象的分钟 (0 ~ 59)
        MM = checkTime(MM);//调用下面的checkTime函数，设置小于10的时间数字格式，例如5秒显示成05秒
        dd = checkTime(dd);
        hh = checkTime(hh);
        mm = checkTime(mm);
        var time = yyyy + "-" + MM + "-" + dd + "T" + hh + ":" + mm;
        var dateControl = document.querySelector("#operationTime");
        dateControl.value = time;
        function checkTime(i) {
            if (i < 10) {
                i = "0" + i;//这里如果是一位数则在前面添加一位0
            }
            return i;
        }
     });
</script>
<script th:src="@{js/jquery-ui.custom.min.js}"></script>
<script th:src="@{js/lin/dialog.js}"></script>
<script th:src="@{js/lin/sendScan.js}"></script>

</html>
